package com.xlcszsgc.module.clob.ui.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xlcszsgc.module.clob.service.IClobService;
import com.xlcszsgc.module.clob.ui.commond.BaseClobCommond;
import com.xlcszsgc.module.resource.vo.CategoryVo;

/**
 * @Title: BaseClobController.java
 * @Package com.xlcszsgc.module.clob.ui.controller
 * @Description: clob控制器
 * @author Zhaoqt  
 * @date 2014-5-26 上午1:16:45
 * @version V1.0
 */
@Controller
@RequestMapping(value = {BaseClobController.portalPath, BaseClobController.modulePath})
public class BaseClobController {

	@Resource(name = "com.xlcszsgc.module.clob.service.impl.ClobServiceImpl")
	private IClobService clobService;
	
	public static final String modulePath = "/module/baseClob";
	
	public static final String portalPath = "/portal/baseClob";
	/**
	 * 文档展现
	 * @Title: view
	 * @param model
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/view")
	public String view(Model model, 
			HttpServletRequest request, BaseClobCommond baseClobCommond) throws Exception{
		baseClobCommond.setCategoryVo(new CategoryVo());
		baseClobCommond.setBaseClob(clobService.getBaseClob(baseClobCommond));
		model.addAttribute("baseClobCommond", baseClobCommond);
		return BaseClobController.portalPath + "/view.jsp";
	}
}
